/**
 * @file BoolExp.h AbsSyn/BoolExp.h
 *
 *  @Author: calle
 *  @date May 1, 2011
 *  
 *  @brief Boolean expression
 *
 *  Implentation of interface expression of type bool
 *
 *  	
 */

/**
 * \brief Boolean expression class
 *
 * Boolean expression is used as an expression.
 * For example
 * \code
 *   if < BoolExp > stmts
 * \endcode
 *
 * In the above the BoolExp has a value.
 *
 * @see IExp
 *
 * \ingroup AbsSyn
 * \ingroup Expressions
 */

#ifndef BOOLEXP_H_
#define BOOLEXP_H_

#include <Interfaces/IExp.h>
#include <AbsSyn/AbsSyn.h>

class BoolExp: public IExp {
public:

	/**
	 * \brief Type definition of generation function.
	 */
	typedef AbsSyn::IExpPtr (*genBoolExpFun)();

	BoolExp(bool b);
	virtual ~BoolExp();


	bool getBool() const;
    void setBool(bool m_bool);

    virtual void accept(IExpVisitor *v);

	/**
	* \brief cloneable expression
	*
	* Abstraction for cloneable.
	* @return Expression interface.
	*/
    virtual IExp* clone() const;

    virtual std::string toString() const;
    /**
     * \brief Generate Bool expression
     *
     * Generates a random bool expression.
     * This will be used by the generator to create
     * create random expressions.
     *
     */
    static AbsSyn::IExpPtr generateBoolExp();

    /**
     * \brief operator ==
     *  Compares this object to another of the same
     *  type
     *
     *  \return true if the same
     */
    bool operator==( const BoolExp& rhs );

    bool operator!=( const BoolExp& rhs );
private:
	bool m_bool;

};

#endif /* BOOLEXP_H_ */
